package cn.quickcode.monitor;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

import cn.quickcode.monitor.ui.part.ConsoleViewPart;

public class Perspective implements IPerspectiveFactory
{

	public void createInitialLayout(IPageLayout layout)
	{
		layout.setEditorAreaVisible(false);
		layout.addView("cn.quickcode.monitor.ui.part.DBMViewPart", IPageLayout.LEFT, 0.95f, IPageLayout.ID_EDITOR_AREA);
		layout.addView("cn.quickcode.monitor.ui.part.STMViewPart", IPageLayout.RIGHT, 0.77f, "cn.quickcode.monitor.ui.part.DBMViewPart");
		layout.addView("cn.quickcode.monitor.ui.part.MCPViewPart", IPageLayout.RIGHT, 0.28f, "cn.quickcode.monitor.ui.part.DBMViewPart");
		{
			IFolderLayout folderLayout = layout.createFolder("folder", IPageLayout.BOTTOM, 0.85f, "cn.quickcode.monitor.ui.part.MCPViewPart");
			folderLayout.addView("cn.quickcode.monitor.ui.part.EVMViewPart");
			ConsoleViewPart cvp = new ConsoleViewPart();
			folderLayout.addView("org.eclipse.ui.console.ConsoleView");
			cvp.openConsole();
		}
		layout.addView("cn.quickcode.monitor.ui.part.SRMViewPart", IPageLayout.BOTTOM, 0.5f, "cn.quickcode.monitor.ui.part.DBMViewPart");
		layout.addView("cn.quickcode.monitor.ui.part.NTMViewPart", IPageLayout.BOTTOM, 0.5f, "cn.quickcode.monitor.ui.part.STMViewPart");
	}
}
